/**
 * 
 */
package com.cyou.qb.common.dao;

import java.util.List;

import org.springframework.stereotype.Component;

import com.cyou.qb.common.domain.AwardDetail;

/**
 * @author zoudongchao
 *
 */
@Component
public class AwardDetailDao extends MysqlBaseDao {
	public AwardDetail findOneAwardDetailByAwardId(int awardId){
		return this.getFirstOne("findOneAwardDetailByAwardId", awardId);
	}
	public int saveAwardDetials(List<AwardDetail> list, String awardId) {
		this.insert("saveAwardDetialList", list);
		return 0 ;
	}
	/**
	 * Description 根据id删除一个虚拟奖品明细
	 * @author lidongwei
	 * @since 2012-10-16
	 */
	public void removeVirtualById(Integer virtualId) {
		this.delete("removeVirtualById", virtualId);
	}
	public AwardDetail findAwardDetailById(int id){
		return this.getUniqueOne("findAwardDetailById",id);
	}
	
	/**
	 * 更新奖品明细
	 * @author zoudongchao
	 * @param awardDetail
	 * @return
	 */
	public int updateOneAwardDetail(AwardDetail awardDetail) {
		return this.update("updateOneAwardDetail", awardDetail);
	}
}
